﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;

namespace EPiServer.Models
{
    public class MetaTag
    {
        public string Name { get; set; }
        public string Content { get; set; }
        public bool HttpEquiv { get; set; }

        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("<meta ");
            if (HttpEquiv)
            {
                sb.AppendFormat("http-equiv=\"{0}\" ", Name);
            }
            else
            {
                sb.AppendFormat("name=\"{0}\" ", Name);
            }

            if (!String.IsNullOrEmpty(Content))
            {
                sb.AppendFormat("content=\"{0}\" ", Content);
            }

            sb.Append("/>");
            return sb.ToString();
        }
    }
}